package com.burpee.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.burpee.dao.ExerciseScheduleDao;
import com.burpee.ui.ExerciseSchedule;

@Service(value="exercisescheduleService")
public class ExerciseScheduleServiceImpl implements ExerciseScheduleService {

	@Autowired
	ExerciseScheduleDao exerciseScheduleDao;
	public List<ExerciseSchedule> list() {
		
		return exerciseScheduleDao.list();
	}

	public ExerciseSchedule view(ExerciseSchedule exerciseSchedule) {
		
		return exerciseScheduleDao.view(exerciseSchedule);
	}

	public boolean add(ExerciseSchedule exerciseSchedule) {
		if(exerciseScheduleDao.add(exerciseSchedule) > 0){
			return true;
		}
		else{

			return false;
		}
	}

	public boolean modify(ExerciseSchedule exerciseSchedule) {
		if(exerciseScheduleDao.modify(exerciseSchedule) > 0){
			return true;
		}
		else{

			return false;
		}
	}

	public boolean remove(ExerciseSchedule exerciseSchedule) {
		if(exerciseScheduleDao.remove(exerciseSchedule) > 0){
			return true;
		}
		else{

			return false;
		}
	}

}
